package com.jingdianjichi.subject.application.controller;


import com.jingdianjichi.subject.infra.entity.UserInfo;
import com.jingdianjichi.subject.infra.rpc.UserRpc;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 测试通过Feign调用auth微服务的业务功能
 * @return:
 * @Author:  sky
 * @date:  2024/11/24 20:23
 */
@RestController
@Slf4j
@RequestMapping("/subject/category")
public class TestFeignController {

    @Autowired
    private UserRpc userRpc;

    @GetMapping("/testFeign")
    public void testFeign(){
        UserInfo userInfo = userRpc.getUserInfo("jichi");
        log.info("TestFeignController.testFeign.userInfo:{}",userInfo);
    }

}
